From: Marco Trevisan (TreviƱo) Date: Mon, 16 Feb 2026 20:58:25 +0000 (+0100) Subject: search: Do not use Cancellable.reset() X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~28^2~4^2^2~27 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=3f6e13e223b9699adb6f4622c399cf245354ac65;p=gnome-shell.git search: Do not use Cancellable.reset() Cancellable reset API is deprecated for long time and it's quite broken. In fact if a search provider receives a cancelled event may end up checking if the cancellable has been cancelled, but this may not be true anymore after a reset. Use instead new cancellable instances so that once one is used we can consider the previous one completed and we can forget about it. Part-of: (cherry picked from commit cead829503083658e736af5964d1d8eb3c92a6bb) --- diff --git a/js/ui/search.js b/js/ui/search.js index 3333e042d..ac5401566 100644 --- a/js/ui/search.js +++ b/js/ui/search.js @@ -225,7 +225,7 @@ const SearchResultsBase = GObject.registerClass({ return; this._cancellable.cancel(); - this._cancellable.reset(); + this._cancellable = new Gio.Cancellable(); const metas = await this.provider.getResultMetas(metasNeeded, this._cancellable); @@ -743,7 +743,7 @@ export const SearchResultsView = GObject.registerClass({ this._startingSearch = true; this._cancellable.cancel(); - this._cancellable.reset(); + this._cancellable = new Gio.Cancellable(); if (terms.length === 0) { this._reset();